import Vue from 'vue'
import Router from 'vue-router'
import Recharge from '../pages/Recharge.vue'
import Place from '../pages/Place.vue'
import Renew from '../pages/Renew.vue'
import User from '../pages/User.vue'
import Logout from '../pages/Logout.vue'
import PayStatus from '../pages/PayStatus.vue'
import LogoutWait from '../components/logout/Wait.vue'
import LogoutSuccess from '../components/logout/Success.vue'
import LogoutFail from '../components/logout/Fail.vue'

import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
Vue.use(Router);
Vue.use(MintUI);
export default new Router({
  routes: [
    {
      path: '/',
      name: 'Recharge',
      component: Recharge
    },
    {
      path: '/place',
      name: 'place',
      component: Place
    },
    {
      path: '/renew',
      name: 'Renew',
      component: Renew
    },
    {
      path: '/user',
      name: 'user',
      component: User
    },
    {
      path: '/payStatus',
      name: 'payStatus',
      component: PayStatus
    },
    {
      path: '/logout',
      name: 'Logout',
      component: Logout,
      redirect: '/logout-wait',
      children: [
        {
          path: '/logout-wait',
          name: 'LogoutWait',
          component: LogoutWait,
        },{
          path: '/logout-success',
          name: 'LogoutSuccess',
          component: LogoutSuccess,
        },{
          path: '/logout-fail',
          name: 'LogoutFail',
          component: LogoutFail,
        }
      ]
    }
  ],
  // base: '/wechat/', //加上这一行
  // mode: 'history'
})
